NAME = nodejs_web
TAG= 0.0.1
INSTANCE = nodejs_web
DB_INSTANCE = userdb
REDIS_INSTANCE = myredis
LOGIN_APP = login
REGISTER_APP = register
DORM_APP = dormitory

default: docker

docker:
	docker build -t $(NAME):$(TAG) .

run:
	docker run --name $(INSTANCE) -p 8080:8080 --link $(DORM_APP) --link $(REGISTER_APP) --link $(LOGIN_APP) --link $(DB_INSTANCE):db --link $(REDIS_INSTANCE):redisdb -d $(NAME):$(TAG)
